package org.freeone.oauth2.authorizeserver.service.impl;

import org.freeone.oauth2.authorizeserver.dao.UserInfoRepository;
import org.freeone.oauth2.authorizeserver.entity.UserEntity;
import org.freeone.oauth2.authorizeserver.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserInfoRepository userInfoRepository;

    /**
     * 根据用户名 查询用户
     *
     * @param username
     */
    @Override
    public UserEntity findByUserName(String username) {
        return userInfoRepository.findByUsername(username);
    }

    /**
     * 修改用户信息
     *
     * @param user
     */
    @Override
    public int updateUser(UserEntity user) {
        return 0;
    }
}
